<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditFeriasTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditFeriasLabel_idFerias}" for="idFerias" />
                    <h:inputText id="idFerias" value="#{feriasController.selected.idFerias}" title="#{bundle.EditFeriasTitle_idFerias}" required="true" requiredMessage="#{bundle.EditFeriasRequiredMessage_idFerias}"/>
                    <h:outputLabel value="#{bundle.EditFeriasLabel_ano}" for="ano" />
                    <h:inputText id="ano" value="#{feriasController.selected.ano}" title="#{bundle.EditFeriasTitle_ano}" required="true" requiredMessage="#{bundle.EditFeriasRequiredMessage_ano}"/>
                    <h:outputLabel value="#{bundle.EditFeriasLabel_estado}" for="estado" />
                    <h:inputText id="estado" value="#{feriasController.selected.estado}" title="#{bundle.EditFeriasTitle_estado}" required="true" requiredMessage="#{bundle.EditFeriasRequiredMessage_estado}"/>
                    <h:outputLabel value="#{bundle.EditFeriasLabel_fkContrato}" for="fkContrato" />
                    <h:selectOneMenu id="fkContrato" value="#{feriasController.selected.fkContrato}" title="#{bundle.EditFeriasTitle_fkContrato}" required="true" requiredMessage="#{bundle.EditFeriasRequiredMessage_fkContrato}">
                        <f:selectItems value="#{contratoController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditFeriasLabel_dataInicial}" for="dataInicial" />
                    <h:inputText id="dataInicial" value="#{feriasController.selected.dataInicial}" title="#{bundle.EditFeriasTitle_dataInicial}" required="true" requiredMessage="#{bundle.EditFeriasRequiredMessage_dataInicial}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.EditFeriasLabel_dataFinal}" for="dataFinal" />
                    <h:inputText id="dataFinal" value="#{feriasController.selected.dataFinal}" title="#{bundle.EditFeriasTitle_dataFinal}" required="true" requiredMessage="#{bundle.EditFeriasRequiredMessage_dataFinal}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                </h:panelGrid>
                <h:commandLink action="#{feriasController.update}" value="#{bundle.EditFeriasSaveLink}"/>
                <br />
                <br />
                <h:commandLink action="View" value="#{bundle.EditFeriasViewLink}" immediate="true"/>
                <br />
                <h:commandLink action="#{feriasController.prepareList}" value="#{bundle.EditFeriasShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.EditFeriasIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
